<?php echo $left ?>
<script>
$( document ).ready(function() {
	$.ajaxSetup({
		cache: false
	});
	$( '.sidebar' ).simpleSidebar({
		settings: {
			opener: '#open-sb',
			wrapper: '.wrapper',
			animation: {
				duration:0,
				easing: 'easeOutQuint'
			}
		},
		sidebar: {
			align: 'left',
			width: 214,
			closingLinks: 'a',
		}
	});
});
</script>

<div class="clear"></div>
<div  class="w640">
      <div class="yd"><span class="ydtxt">联系我们</span> - 邮件发送</div>
      <table cellpadding="0" cellspacing="0" class="biao">
      <?php echo form_open('mobile/mail/message',array('id'=>'myform')); ?>
	     <tr>
		    <td class="w140s">收件人邮箱</td>
           <td><span class="titii">得道天合平台客服</span></td>
		 </tr>
		 <tr>
		    <td class="w140s">邮件标题</td>
	        <td><input name="title" type="text" value="" class="input1" style="width:390px;" /></td>
		 </tr>
		 <tr>
		    <td class="w140s">留言内容</td>
	        <td>
	          <textarea name="content" class="youjian mt10"></textarea></td>
		 </tr>
		 
		 <tr>
		    <td colspan="2" >
		        <div class="inp360"><input class="inputt" type="submit" value="确认提交"></div></td>
         </tr>
  </form>
  </table>
	  <div class="dx"></div>
	  <div class="yd2"><span class="ydtxt">联系我们</span> - 收件列表</div>
	  <table cellpadding="0" cellspacing="0" class="liebiao">
	     <tr>
		    <th><span class="w110">标题</span></th>
            <th><span class="w410">内容</span></th>
			<th>日期</th>
			<td>回复状态</td>
			<td>阅读状态</td>
		 </tr>
		 					<?php 
                            foreach ($result as $rs){
                            ?>
                            <tr>
                            	<td><a href="mail_detail/index?id=<?php echo $rs['id'];?>"><?php echo $rs['message_title'];?></a></td>
                                <td><?php echo $rs['message_content'];?></td>
                                <td><?php echo date("Y-m-d",$rs['message_time']);?></td>
								<td>待回复</td>
								<td>已读</td>
                            </tr>
                            <?php }?>
  </table>
</div>
<script>
	$(".inp360>input").click(function(event){
		event.preventDefault();
		var title=$(".input1").val().trim();
		var content=$(".youjian").val().trim();
		if(title){
			if(content){
				$("#myform").submit();
			}else{
				alert("邮件内容不能为空");
			}
		}else{
			alert("标题不能为空");
		}
	});
</script>
<?php echo $foot; ?>